//
//  JZChargeRecordCell.m
//  JFTwxsd
//
//  Created by Peter on 2018/4/10.
//  Copyright © 2018年 junfeiweiyejiaoyujituan. All rights reserved.
//

#import "JZChargeRecordCell.h"

@interface  JZChargeRecordCell()

@property (weak, nonatomic) IBOutlet UILabel *phoneLab;
@property (weak, nonatomic) IBOutlet UILabel *moneyLab;
@property (weak, nonatomic) IBOutlet UILabel *stateLab;
@property (weak, nonatomic) IBOutlet UILabel *orderIdLab;
@property (weak, nonatomic) IBOutlet UILabel *createTimeLab;

@end

@implementation JZChargeRecordCell

- (void)configCellContent:(NSDictionary *)dic {
    _orderIdLab.text = Format(@"商户单号:%@",dic[@"orderid"] ?: @"暂无");
    _createTimeLab.text = Format(@"%@",dic[@"createtime"] ?: @"-");
    _phoneLab.text = Format(@"%@",dic[@"mobile"] ?: @"暂无");
    _moneyLab.text = Format(@"%.2f",[dic[@"money"] floatValue]?: 0.00);
    _stateLab.text = Format(@"%@",dic[@"is_success"] ?: @"暂无");
    
    if ([dic[@"is_success"] isEqualToString:@"交易成功"]) {
       
    } else if ([dic[@"is_success"] isEqualToString:@"交易失败"]) {
      
    } else if ([dic[@"is_success"] isEqualToString:@"交易中"]) {
        
    }
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (IBAction)onCheckTap:(UIButton *)sender {
    if (self.rootTarget != nil && self.selector != nil) {
        [self.rootTarget performSelector:self.selector withObject:self withObject:sender];
    }
}

@end
